import { RSAEncrypt } from '/@/utils/encryption';
import { Session } from '/@/utils/storage';
import settings from '/@/common/settings';

const uploadData = (url: string) => {
	let token = Session.get('UserToken');
	return {
		action: import.meta.env.VITE_API_URL + url,
		headers: {
			token: token,
			Sign: RSAEncrypt(token + settings.signKey, settings.rsaPublicKey),
		},
	};
};

export {uploadData}